<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>AdWords::Pre2009HeaderHandler</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
    <script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>     
    <div class="banner">
        <h1>
            <span class="type">Class</span> 
            AdWords::Pre2009HeaderHandler 
            
                <span class="parent">&lt; 
                    
                    SOAP::Header::SimpleHandler
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../../files/lib/adwords4r/credentials_rb.html">lib/adwords4r/credentials.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
    
    <div class="description">
        <p>
Handles the headers used in <= v13 (both sandbox and production)
</p>

    </div>
    

    

    
    

    
    
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
    
        <dt>N</dt>
        <dd>
            <ul>
                
                <li><a href="#M000032">new</a></li>
                
            </ul>
        </dd>
    
        <dt>O</dt>
        <dd>
            <ul>
                
                <li><a href="#M000033">on_simple_outbound</a></li>
                
            </ul>
        </dd>
    
    </dl>
    

    

    

    

    

    
    <div class="sectiontitle">Attributes</div>
    <table border='0' cellpadding='5'>
        
        <tr valign='top'>
            <td class='attr-rw'>
                [R]
            </td>
            <td class='attr-name'>tag</td>
            <td class='attr-desc'></td>
        </tr>
        
        <tr valign='top'>
            <td class='attr-rw'>
                [W]
            </td>
            <td class='attr-name'>credentials</td>
            <td class='attr-desc'></td>
        </tr>
        
    </table>
    

    
            <div class="sectiontitle">Class Public methods</div>
            
            <div class="method">
                <div class="title" id="M000032">
                    
                    <a name="M000032"></a><b>new</b>(tag, credentials)
                    
                </div>
                
                <div class="description">
                  <p>
Constructor for <a
href="Pre2009HeaderHandler.html">Pre2009HeaderHandler</a>.
</p>
<p>
Args:
</p>
<ul>
<li>tag: XML tag name to be handled (email, password, etc.)

</li>
<li>value: value to be sent inside tag on outgoing requests

</li>
</ul>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show</a>
                        
                    </p>
                    <div id="M000032_source" class="dyn-source">
                        <pre><span class="ruby-comment cmt"># File lib/adwords4r/credentials.rb, line 111</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">tag</span>, <span class="ruby-identifier">credentials</span>)
      <span class="ruby-keyword kw">super</span>(<span class="ruby-constant">XSD</span><span class="ruby-operator">::</span><span class="ruby-constant">QName</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">tag</span>))
      <span class="ruby-ivar">@tag</span> = <span class="ruby-identifier">tag</span>
      <span class="ruby-ivar">@credentials</span> = <span class="ruby-identifier">credentials</span>
    <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
            <div class="sectiontitle">Instance Public methods</div>
            
            <div class="method">
                <div class="title" id="M000033">
                    
                    <a name="M000033"></a><b>on_simple_outbound</b>()
                    
                </div>
                
                <div class="description">
                  <p>
Handles callback.
</p>

                </div>
                
                
                
                
                <div class="sourcecode">
                    <p class="source-link">
                        Source: <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show</a>
                        
                    </p>
                    <div id="M000033_source" class="dyn-source">
                        <pre><span class="ruby-comment cmt"># File lib/adwords4r/credentials.rb, line 118</span>
    <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">on_simple_outbound</span>
      <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@tag</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'clientEmail'</span>
        <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@credentials</span>.<span class="ruby-identifier">client_email</span>
      <span class="ruby-keyword kw">elsif</span> <span class="ruby-ivar">@tag</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'clientCustomerId'</span>
        <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@credentials</span>.<span class="ruby-identifier">client_customer_id</span>
      <span class="ruby-keyword kw">else</span>
        <span class="ruby-ivar">@credentials</span>.<span class="ruby-identifier">credentials</span>[<span class="ruby-ivar">@tag</span>]
      <span class="ruby-keyword kw">end</span>
    <span class="ruby-keyword kw">end</span></pre>
                    </div>
                </div>
                
            </div>
            
</div>
    </div>
  </body>
</html>    